import com.bjpowernode.dao.StudentDao;
import com.bjpowernode.entity.Student;
import com.bjpowernode.utils.Myutil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Mytest {
    @Test
    public void selectStudent(){
        SqlSession session = Myutil.getSqlSession();
        StudentDao dao = session.getMapper(StudentDao.class);

        HashMap<String, Object> data = new HashMap<>();
        data.put("myid",2);
        data.put("myage",18);
        List<Student> students = dao.selectMap(data);
//        students.forEach( stu -> System.out.println(stu));
        System.out.println(students);

        session.close();



    }
}
